<template>
    <div style="height: 100vh;overflow: hidden;" >
        <!-- <script id="editor" type="text/plain"></script> -->
        <!-- <vue-ueditor-wrap v-model="msg" :config="editorConfig" editor-id="editor-demo-01"></vue-ueditor-wrap> -->
        <quill-editor v-model="content" class="advice-quill-editor"></quill-editor>
    </div>
</template>
<script>
import VueUeditorWrap from 'vue-ueditor-wrap';
import { quillEditor } from 'vue-quill-editor'
export default {
    components:{
        VueUeditorWrap,
        quillEditor,
    },
    props:{

    },
    data(){
        return{
            msg:'',
            editorConfig:{
                // 编辑器不自动被内容撑高
    //   autoHeightEnabled: false,
                initialFrameWidth: '100%',
                initialFrameHeight: 400,
                UEDITOR_HOME_URL: '/UEditor/'
            },
            editor: null,
            content:'',

        }
    },
    watch:{

    },
    mounted () {
        this.editor = window.UE.getEditor('editor', this.config);
        this.editor.addListener('ready',  () => {
            this.editor.setContent(this.msg)
        })
    },
    methods:{
        getUEContent () {
            return this.editor.getContent()
        }
    }
}
</script>
